﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OA协同办公系统</title>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<link href="css/table.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function updatetext(){
		var text = $("#text").val();
		var tid = $("#tid").val();
		var tus = $("#tus").val();
		var time =$("#time").val();
		if($.trim(text)==''||$.trim(text)==null){
			$("#errorinfo").html("<img src=\"image/cuo.gif\" width=\"16\" height=\"16\" />&nbsp;<font color=\"#FF0000\">不能为空！</font>");
			return;
		}else{
			$("#errorinfo").html("");
		}
if(text.length>50){alert("不能超过50个字符");return;}
		var param={"oworklan.content":text,"oworklan.id":tid,"oworklan.userId":tus,"oworklan.createTime":time}
		$.post("updatetext.action",param,function(data){
			if(data=='success'){
				alert("修改成功");
				window.close();
				var currentPage=$("#currentPage").val();
					window.opener.page(currentPage);
			}else{
				alert("添加失败！");
			}
		});
	}
</script>
</head>
<body>
<input type="hidden" id="currentPage" value="${currentPage}">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
  <tbody>
  <tr>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
    <td style="background: url('image/wsoa_window_002.gif');"><table border="0" cellpadding="0" cellspacing="0">
      <tbody><tr>
        <td align="center" style="background: url('image/wsoa_window_002.gif');" width="10"><img src="image/center_19.gif"></td>
        <td align="center" style="background: url('image/wsoa_window_002.gif');"></td>
        <td></td>
        </tr>
    </tbody>
    </table></td>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
  </tr>
  <tr>
    <td style="background: url('image/wsoa_window_010.gif');"  width="1">&nbsp;</td>
    <td>

<table style="margin: 10px 10px 10px 10px " align="center">
<tr><td>办公语修改：</td></tr>
<tr><td>
<input type="hidden" id="tid" value="${oworklan.id }"  />
<input type="hidden" id="tus" value="${oworklan.userId}"  />
<input type="hidden" id="time" value="${oworklan.createTime }"  />
<textarea id="text" style="width:250px; height:150px; overflow:hidden">${oworklan.content }</textarea>
</td></tr>
<tr><td><input type="submit" class="button_02" value="修改" onclick="updatetext()" />&nbsp;&nbsp;
<span id="errorinfo"></span>
</td></tr>
</table>
<td style="background: url('image/wsoa_window_006.gif');"  width="1">&nbsp;</td></tr>
  <tr>
    <td height="1" width="1"><img src="image/wsoa_window_009.gif" height="16" width="14"></td>
    <td style="background: url('image/wsoa_window_008.gif');" height="1"></td>
    <td height="1" width="1"><img src="image/wsoa_window_007.gif" height="16" width="12"></td>
  </tr>
</tbody>
</table>
</body>
</html>